<template>

<nav class="nav">
<van-nav-bar title="聊天" />
</nav>

<div class="messagesArea">

    <div class="messageItem" v-for="(item,index) in list" :key="index">
        <div>
            <img class="img" :src="item.imgURL" alt="">
        </div>
        <div class="contentArea">
            <div class="titleArea">
                <div class="title">{{item.title}}<span class="flg">{{item.flg}}</span></div>
                <div class="date">{{item.date}}</div>
            </div>
            <div class="description">{{item.description}}</div>
        </div>
    </div>

</div>


</template> 

<style>
.nav{
    position: fixed;
    top: 0;
    width: 100%;
    border-bottom: 2px solid #888;
}
.messagesArea{
    padding: 10px;
    margin-top: 110px;
    margin-bottom: 100px;
    display: flex;
    flex-direction: column;
    font-size: 30px;
}

.messageItem{
    padding: 20px;
    height: 200px;
    align-items: center;
    display: flex;
    border-bottom: 1px solid #888 ;
}

.messageItem .img{
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
}

.contentArea{
    width: 100%;
    padding-left: 50px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contentArea .titleArea{
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 60px;
    line-height: 60px;
}

.titleArea .title{
    font-size: 40px;
    font-weight: 500;
}

.titleArea .title .flg{
    border: 1px solid red;
    font-size: 28px;
    color: red;
    margin-left: 10px;
    display: inline-block;
    line-height: 28px;
    padding: 2px;
}

.titleArea .date{
    font-size: 26px;
    color: #888;
}

.contentArea .description{
    text-align: left;
    padding-top: 20px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-border {  
  border: none;  
}



</style>
  
<script>

export default{
   
    data(){
        return{
            list: [
                {imgURL:require('@/assets/images/messages1.png'),title: "交易通知",flg:"官方",date: "下午 09:15",description: "下单成功通知"},
                {imgURL:require('@/assets/images/messages2.png'),title: "物流助手",flg:"官方",date: "下午 07:43",description: "订单签收提醒"},
                {imgURL:require('@/assets/images/messages3.png'),title: "多多支付",flg:"官方",date: "昨天",description: "转账入账通知"},
                {imgURL:require('@/assets/images/messages4.png'),title: "优惠活动通知",flg:"官方",date: "昨天",description: "1张优惠劵未使用"},
                {imgURL:require('@/assets/images/messages5.png'),title: "智配汽车配件旗舰店",date: "星期三",description: "亲，您之前游览过该商品降价了,点击查看详情"},
                {imgURL:require('@/assets/images/messages6.png'),title: "回力旗舰店",date: "星期二",description: "您购买的商品已到货，确认收货并发表带图评论可获得现金奖励"},
                {imgURL:require('@/assets/images/messages7.png'),title: "仁美数码专卖店",date: "星期六",description: "[收货地址修改成功]"},
                {imgURL:require('@/assets/images/messages8.png'),title: "新易车专用品店",date: "星期六",description: "[常见问题列表]"},
            ]
        }
    }
}  

</script>    
  
